package com.cat.responsibility;

/**
 * @author cat
 * @version 2025/5/27 14:03
 * @description
 * @since JDK17
 */

public class Client {
    public static void main(String[] args) {
        // 创建一个请假条对象
        LeaveRequest leaveRequest = new LeaveRequest("小明", 1, "发烧");

        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        // 设置处理者链
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        // 处理请求
        groupLeader.submit(leaveRequest);
    }
}
